﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PageView.aspx.cs" Inherits="BEGDC.CC.Web.Admin.PageView"
    EnableViewState="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../css/global.css" rel="stylesheet" type="text/css" />
    <link href="../css/main.css" rel="stylesheet" type="text/css" />
    
    <script language="JavaScript" type="text/javascript" src="../js/jquery-1.4.4.min.js"></script>
    <script language="javascript" type="text/javascript">
        $(document).ready(function() {
            /*奇数行偶数行背景色*/
            $(".tablestyle tr:even").addClass("trwhitebg");
            $(".tablestyle tr:odd").addClass("trpurplebg");

            $(".switch-ccd,.switch-cco,.switch-cid,.switch-cio,.switch-acr,.switch-ezv,.switch-adm")
                .bind("change", function() {
                    var indicator = "." + $(this).attr("class").replace("switch", "cb");
                    //alert($(this).attr("checked"));
                    var flag = $(this).attr("checked");
                    //alert(flag);
                    if (flag)
                        $(indicator).attr("checked", flag);
                    else
                        $(indicator).removeAttr("checked");
                });
        });
    </script>
</head>
<body>
    <form runat="server">
    <div class="mainbox">
        <div class="sitemapbox">
        <div class="sitemap">
             &nbsp;&raquo;&nbsp;Administration&nbsp;&raquo;&nbsp;Page Access Management
        </div>
        </div>
        <table width="100%"><tr><td>
        <!--tab区域-->
            <div class="tabbox purplebg_dark">
                <ul class="tabpos">
                    <li><span class="tab_active">Page Access Management</span></li>
                </ul>
            </div>
        </td></tr></table>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                   <table class="tablestyle"><tr class="thead">
                        <td>FullName</td>
                        <td>CCD<input class="switch-ccd" type="checkbox" /></td>
                        <td>CCO<input class="switch-cco" type="checkbox" /></td>
                        <td>CID<input class="switch-cid" type="checkbox" /></td>
                        <td>CIO<input class="switch-cio" type="checkbox" /></td>
                        <td>ACR<input class="switch-acr" type="checkbox" /></td>
                        <td>EZVisit<input class="switch-ezv" type="checkbox" /></td>
                        <td>Admin<input class="switch-adm" type="checkbox" /></td>
                    </tr>
                    <asp:Repeater runat="server" DataSourceID="odsPage">
                        <ItemTemplate>
                            <tr class="<%#Eval("IsDefault") %> tbody">
                                <td style="text-align:left;">
                                    <%#Eval("FullName") %>
                                </td>
                                <td>
                                    <input class="cb-ccd" type="checkbox" name="pagecheckbox" value="<%#Eval("FullName") %>|CCD" <%#Eval("IsCCD") %> />
                                </td>
                                <td>
                                    <input class="cb-cco" type="checkbox" name="pagecheckbox" value="<%#Eval("FullName") %>|CCO" <%#Eval("IsCCO") %> />
                                </td>
                                <td>
                                    <input class="cb-cid" type="checkbox" name="pagecheckbox" value="<%#Eval("FullName") %>|CID" <%#Eval("IsCID") %> />
                                </td>
                                <td>
                                    <input class="cb-cio" type="checkbox" name="pagecheckbox" value="<%#Eval("FullName") %>|CIO" <%#Eval("IsCIO") %> />
                                </td>
                                <td>
                                    <input class="cb-acr" type="checkbox" name="pagecheckbox" value="<%#Eval("FullName") %>|ACR" <%#Eval("IsACR") %> />
                                </td>
                                <td>
                                    <input class="cb-ezv" type="checkbox" name="pagecheckbox" value="<%#Eval("FullName") %>|EZVisit"
                                        <%#Eval("IsEZVisit") %> />
                                </td>
                                <td>
                                    <input class="cb-adm" type="checkbox" name="pagecheckbox" value="<%#Eval("FullName") %>|Admin" <%#Eval("IsAdmin") %> />
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                        </table>
            <div class="formbox">
                <span class=" float_lft">

                        <asp:Button ID="Button1" runat="server" Text="同步到数据库" OnClick="UpdateToDB_Click" CssClass="btn" />
                        <asp:ObjectDataSource ID="odsPage" runat="server" SelectMethod="GetAspxPagesInfo"
                        TypeName="ASBCC.Business.PageHelper"></asp:ObjectDataSource>
                        </ContentTemplate>
                        </asp:UpdatePanel>
                        <asp:UpdateProgress ID="UpdateProgress1" runat="server">
                        <ProgressTemplate>
                        <asp:Label ID="Label1" runat="server" Text="页面正在加载数据，请稍候。。。"></asp:Label>
                        </ProgressTemplate>
                        </asp:UpdateProgress>
                </span>
            </div>
    </div>
    </form>
</body>
</html>
